package com.ribbon;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**这个是Lrule配置类
 * @author WangYuKai
 * @Date 2022/6/22
 * @apiNote
 */
@Configuration
public class MySelfRule {

    @Bean
    public IRule myIrule(){
        //使用随机访问
        return new RandomRule();
    }
}
